Skip to content

Announce a new major version apart from regular updates - #241

Merged
minoneer merged 2 commits into
masterfrom
feature/update-check-major-lines
Oct 25, 2026
Merged

minoneer merged 2 commits into
masterfrom
feature/update-check-major-lines

Conversation

@minoneer

Copy link
Copy Markdown
Member

Once 4.0.0 is out, it becomes GitHub's latest release, and 3.x servers would be told to simply install it. 4.0 is a new major version with a migration, so the update check now tells the two apart.

  • Regular update: the newest release on the major version the server runs, as before: "There is a new version of uSkyBlock available: 3.8.0".
  • New major version: a separate notice, in the console and in /usb version: "There is a new major version of uSkyBlock available: 4.0.0" and "Read its release notes before upgrading: ". Both notices can show together.
  • The request: still one per check. It reads the release list (/releases?per_page=100) instead of /releases/latest, and skips drafts, prereleases and tags that aren't versions.
  • Unchanged: the failure handling and STAGING. getLatestVersion() still means the newest release on the running major version (on STAGING, whatever the staging feed says, as documented now). The API stays binary compatible.

Tests: 12 new in SkyUpdateCheckerTest and PluginInfoTest, all without network. They cover choosing the release on the running major version when a newer major exists, both notices together, only the major notice, drafts and prereleases ignored, unparsable tags, a 4.0.0-SNAPSHOT build seeing 4.0.0 as a regular update, and the failure paths.

Independent of the reload fix; the two change no file in common.

The RELEASE channel now reads the GitHub release list instead of only
the latest release. Drafts, prereleases and tags that aren't a version
are skipped. The regular update notice uses the newest release on the
running major version, so a 3.x server keeps being told about 3.x
updates once 4.0.0 is out.

If the newest release overall has a higher major version, the console
and /usb version also show it with a link to its release notes, so
admins read up on the migration before upgrading. Like the regular
notice, it is shown on every check. Both can show at once.

Failed checks behave as before, and it is still one request per check.
STAGING is unchanged. UpdateChecker.getLatestVersion() keeps reporting
the latest release on the running major version.
getLatestVersion() reads the staging feed as it is on the STAGING channel,
so it can report a newer major version there. The docs now say so, and a
test pins it. Another test checks that a snapshot of a new major version
gets that version's release as a regular update.
@minoneer
minoneer merged commit 24ac38c into master Oct 25, 2026
6 checks passed
@minoneer
minoneer deleted the feature/update-check-major-lines branch October 26, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant